/*
 * mem_wrap.h
 *
 * Copyright (C) 2014 Ingenic Semiconductor Co.,Ltd
 */

#ifndef __WRAP_H__
#define __WRAP_H__

#define IMP_MALLOC(object_size) imp_malloc((object_size), __func__, __LINE__)
#define IMP_CALLOC(nmemb, memb_size) imp_calloc((nmemb), (memb_size), __func__, __LINE__)
#define IMP_REALLOC(ptr, object_size) imp_realloc((ptr), (object_size), __func__, __LINE__)
#define IMP_FREE(ptr) imp_free((ptr), __func__, __LINE__)

char *imp_malloc(size_t object_size, const char *funcs, int lines);
char *imp_calloc(size_t nmemb, size_t memb_size, const char *funcs, int lines);
char *imp_realloc(void *ptr, size_t object_size, const char *funcs, int lines );
void imp_free(void *ptr, const char *funcs, int lines );
int mem_init(void);


#endif /* __WRAP_H__ */
